package com.ma.a05;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.support.GenericApplicationContext;

/**
 * @ClassName A05Application2
 * @Author: mayongqiang
 * @DATE 2022/4/1 20:09
 * @Description: ComponentScanPostProcessor.class 使用  扫描注册@Component
 */

public class A05Application2 {
    private static final Logger log = LoggerFactory.getLogger(A05Application2.class);
    public static void main(String[] args) {
        GenericApplicationContext context = new GenericApplicationContext();
        context.registerBean("config", Config.class);
        context.registerBean(ComponentScanPostProcessor.class);

        context.refresh();
        for (String name : context.getBeanDefinitionNames()) {
            System.out.println(name);
        }


        context.close();
    }
}
